package com.dykj.fireFighting.web.service.impl;/**
 * Created by admin on 2019-9-17.
 */

import com.dykj.fireFighting.common.core.utils.DateUtil;
import com.dykj.fireFighting.common.starter.redisson.service.RedisService;
import com.dykj.fireFighting.web.entity.DevHis;
import com.dykj.fireFighting.web.entity.DevHisWater;
import com.dykj.fireFighting.web.mapper.DevHisMapper;
import com.dykj.fireFighting.web.service.DevHisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author ZhouChunfu
 * @date 2019-9-17
 */
@Service
public class DevHisServiceImpl implements DevHisService {
    @Autowired
    private DevHisMapper devHisMapper;
    @Override
    public int insertHis(DevHis record) {
        String tableName="dev_his_"+DateUtil.getYearWeek();
        return devHisMapper.insertHis(tableName,record);
    }

    @Override
    public int insertDevHisWater(DevHisWater devHisWater) {
        String tableName="dev_his_water_"+DateUtil.getYearWeek();
        return devHisMapper.insertDevHisWater(tableName,devHisWater);
    }

}
